﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace ThesisSystem.Models
{
    public class GClass
    {
        [Key]
        public int ClassID { get; set; }

        [Required(ErrorMessage = "*")]
        [StringLength(50)]
        [Display(Name = "班级")]
        public string ClassName { get; set; }

        [Required(ErrorMessage = "*")]
        [Display(Name = "年级")]
        [Range(1990, 2099)]
        public int Grade { get; set; }

        [Display(Name = "系部")]
        public int DepartmentID { get; set; }

        public virtual Department Department { get; set; }
    }
}